Dialog Boxes
QuickDraw GX print dialog boxes provide several key features:
QuickDraw GX provides three kinds of print dialog boxes that you can access in your application:
- They are extensible, which allows you to collect or display information that is not in the default dialog boxes.
- They are movable in addition to being modal. The ability to drag a dialog box around the screen overcomes some of the inconvenience of modality in that the user can move the dialog box if needed information in an underlying window is obscured. The user is allowed to switch to a different application while the dialog box is active, as well.
- They can be set up to provide cut, copy, and paste editing operations.
- The application's response to user choices in a dialog box can be automated by specifying actions in resources associated with the dialog box; less procedural code is required in the application.
In addition to these dialog boxes, the Printing Status dialog box appears when the application is spooling a document to a print file.
- The Print dialog box appears in response to a request to print a document.
- The Page Setup dialog box appears in response to a request to change the default formatting for the document.
- The Custom Page Setup dialog box appears in response to a request to change the formatting of individual pages within a document.
Most dialog boxes display in both a normal view and an expanded view. You use the normal view to display and accept the minimum amount of information that allows the user to conveniently proceed with the task. Figure 1-5 shows the default Print dialog box in its normal view.
Figure 1-5 The Print dialog box
The expanded view displays the complete range of options. Figure 1-6 shows the expanded view of the Print dialog box.
Figure 1-6 The expanded Print dialog box
Expanded views are divided into panels, which are subsets of the dialog box used to display and collect related pieces of information. You can add panels to a dialog box in the same way that a printer driver or printing extension may add panels. In Figure 1-6, the expanded view is currently displaying information in the General panel. Each panel is associated with an icon that displays in a scrolling list to the left of the panel. The name of the panel appears underneath its icon.
Figure 1-7 shows the Print Time panel. This panel allows a user to specify information related to a particular print job, such as the print job's priority and designated time to print.
Figure 1-7 The Print Time panel
Figure 1-8 shows the Paper Match panel. This panel allows a user to specify information related to a print job's paper type, such as standard or special paper mapping.
Figure 1-8 The Paper Match panel
You can use the following resources to add panels to dialog boxes:
Resource Type Description Item list resource ' DITL
'Specifies a list of items in a dialog box, as described in the Dialog Manager chapter of Inside Macintosh: Macintosh Toolbox Essentials. Panel resource 'ppnl' Names a panel and associates it with an item list resource and an icon resource. For more information, see the chapter "Page Formatting and Dialog Box Customization" in this book. Extended item list resource ' xdtl
'Specifies the actions to take when an item is manipulated; for example, when the user clicks a radio button. For more information, see the chapter "Page Formatting and Dialog Box Customization" in this book. Additional resources may be needed. For example, many items in a dialog box are themselves defined as control or menu resources.
As mentioned previously, QuickDraw GX print dialog boxes are movable as well as being modal. When a user moves a dialog box, you are responsible for redrawing the screen that was behind it. QuickDraw GX notifies you that an update event occurred when this happens. The notification is provided by QuickDraw GX passing a message to the application, as described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help